package cx.hoffmann.bab.web.controller;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: lasombra
 * Date: 2009/10/05
 * Time: 7:58:13 PM
 */

@Controller
@RequestMapping ( "/web/index" )
public class Index
{
	private static Logger log = Logger.getLogger( Index.class );

	@RequestMapping ( method = RequestMethod.GET )
	public List<String> index( Model model )
	{
		List<String> lista = new ArrayList<String>();

		lista.add( "Item 1" );
		lista.add( "Item 2" );
		lista.add( "Item 3" );

		model.addAttribute( "lista", lista );

		log.info( "Retornando lista..." );
		return lista;
	}
}
